package com.slz3.business.module.wmsManagement.wmsStockTransfer.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.wmsManagement.wmsStockTransfer.domain.WmsStockTransfer;
import com.slz3.business.module.wmsManagement.wmsStockTransfer.domain.WmsStockTransferCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class WmsStockTransferResAtomic extends WmsStockTransferResExecutor {

    public Mono<ServerResponse> add_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransfer wmsStockTransfer) {
        return WmsStockTransferResSafeValid.add(req, wmsStockTransfer) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, wmsStockTransfer);
    }
    public Mono<ServerResponse> batchAdd_$WmsStockTransferUpdateLock(ServerRequest req,WmsStockTransfer wmsStockTransfer) {
        return WmsStockTransferResSafeValid.batchAdd(req, wmsStockTransfer) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.batchAdd(req, wmsStockTransfer);
    }

    public Mono<ServerResponse> delete_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        return WmsStockTransferResSafeValid.delete(req, wmsStockTransferCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransfer wmsStockTransfer) {
        return WmsStockTransferResSafeValid.modify(req, wmsStockTransfer) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, wmsStockTransfer);
    }

    public Mono<ServerResponse> info_$WmsStockTransferUpdateLock(ServerRequest req) {
        return WmsStockTransferResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        return WmsStockTransferResSafeValid.auditSubmit(req, wmsStockTransferCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        return WmsStockTransferResSafeValid.audit(req, wmsStockTransferCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        return WmsStockTransferResSafeValid.auditReject(req, wmsStockTransferCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        return WmsStockTransferResSafeValid.usingEnable(req, wmsStockTransferCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$WmsStockTransferUpdateLock(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        return WmsStockTransferResSafeValid.usingDisable(req, wmsStockTransferCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
